Creating a Logix5000 Custom Data Group
Data groups for a Logix5000 controller (CIP_Protocol="Native") must be defined
on a case-by-case basis.
You must create data groups that satisfy the following requirements:
- They must map to data items (that is, controller-scoped tags) that exist on associated field devices.
- They must structure data for optimized use in a CygNet SCADA system. For example, group data items to be polled frequently with other such data items.
Controller-scoped tags are considered "global" to a controller; only global tags are accessible to the Allen Bradley CIP EIE. Program-scoped tags are considered "local" to a program; local tags are not accessible to the Allen Bradley CIP EIE. Define data groups that map to global tags and represent only those data items on an associated Allen-Bradley device that you want to include in your CygNet SCADA system.
Tag names are the primary mapping element between CygNet SCADA data groups and Logix5000 data items. A tag is merely the name portion of a name-value pair that represents the output of an Allen-Bradley function. A CygNet SCADA device template file uses the XML element tagname to correlate a CygNet SCADA data point with an Allen-Bradley tag.
Allen-Bradley configuration software (RSLogix 5000) enables you to output a CSV file with all global tags and corresponding data types. This file might help speed up your device template file creation.
To Create a Custom Data Group for CIP
- Using a text editor of your choice (but not Notepad), open a new or existing device template file where
CIP_Protocol="Native"is defined. - Define a data group element, including a data group name and description.
- Define a dgElements element.
- Define data group elements to meet your needs.
- Each must be uniquely named.
- Each must map to a tag on the associated field device by correctly defining a tagname attribute.
- If the data type is a string, the string length is defined by the len attribute. If the len attribute is missing, the length is assumed to be 82. The maximum allowed length for read-only strings is 472. For writeable strings, the maximum allowed length is 470 minus the length of the tagname attribute expressed as an even number of bytes. If the result is not divisible by 4, reduce it until it is. For example, if the tagname is 11 bytes long, the maximum string length is 470 – 12 = 458 (11 bytes expressed as an even number is 12). 458 is not divisible by 4, so reduce it to 456 (the first number lower than 458 that is divisible by 4). The string length is always validated, but the maximum value allowed depends on the IO Service selected. A warning will appear if a number greater that the maximum allowable string is entered in the Data Group Element Definition dialog box.
- Save your edits.
- When you are done editing the template, use the CygNet Device Template Manager utility (DtfMgr.exe) to check your work, then load the template to the applicable Device Definition Service (DDS), and test it by reading and/or writing values.
Example
|
<DateTime niceName="DateTime" dgProtocol="Native" canSend="true" canRecv="true" uccSend=" true" uccRecv="true" devDG="true" baseOrd="0" maxCnt="1" udcCat="~UDCALL" udcDefFac="true"> <dgElements secLev="4" type="i4"> <Year desc="Controller Time Year" tagname="ControllerTime.Yr" hidden="true"/> <Month desc="Controller Time Month" tagname="ControllerTime.Mo" hidden="true"/> <Day desc="Controller Time Day" tagname="ControllerTime.Da" hidden="true"/> <Hour desc="Controller Time Hour" tagname="ControllerTime.Hr" hidden="true"/> <Minutes desc="Controller Time Minutes" tagname="ControllerTime.Min" hidden="true"/> <Seconds desc="Controller Time Seconds" tagname="ControllerTime.Sec" hidden="true"/> <DtComp desc="Date Time" type="string" isRef="1"> <ref prec="0" refOp="opTimeComp" deidYear="Year" deidMonth="Month"deidDay="Day" deidHour="Hour" deidMinute="Minutes" deidSecond="Seconds"/> <ref prec="1" refOp="opFormat" format="DateTime"/> </DtComp> <DtString desc="Date Time (string)" tagname="DateTimeString" type="string" len="32"/> </dgElements> </DateTime> |

